// 讲布局视口大小设为设备像素尺寸
var scale = 1 / window.devicePixelRatio;
// alert(scale);
document.querySelector('meta[name="viewport"]').setAttribute('content','width=device-width,initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=no');

// 动态设置html字体大小
document.documentElement.style.fontSize = document.documentElement.clientWidth / 10 + 'px';